package tut.thread;

public class ThreadStateEx {
	public static void main(String[] args) {
		Thread t = new ThreadX("First ");
		message(t.getState().toString());
		message("alive ? " + t.isAlive());
		time();
		t.start();
		message("alive ? " + t.isAlive());
		message(t.getState().toString());
		time();
		t.yield();
		time();
		message(t.getState().toString());
		message("alive ? " + t.isAlive());


	}

	public static void time() {
		System.out.println(System.currentTimeMillis());
	}

	public static void message(String s) {
		System.out.println(s);
	}

}
